package infostroy.bookagolf.common.enums;

public enum HolesValues {

	TYPE1(9), TYPE2(18);

	private int value;

	private HolesValues(int value) {
		this.value = value;
	}

	public int getValue() {
		return value;
	}

	public static HolesValues getByValue(int value) {
		for (HolesValues item : HolesValues.values()) {
			if (item.getValue() == value) {
				return item;
			}
		}
		return TYPE1;
	}

	@Override
	public String toString() {
		return Integer.toString(this.getValue());
	}

}
